<?php
require_once 'lib/controllerWithoutGetOrPost.php';
/**
 * Move a featured listing to the history
 *
 * @return bool
 * @param int $position
 */
function moveToHistory($position) {
    global $db;
    $queryupdate = "Update FeaturingPerson Set `Position` = 10, `DateAdded` = '".gmdate("Y-m-j H:i:s", time() + 3600*12)."' WHERE `Position` = ".$position;
    $resultupdate = $db->query($queryupdate);
    return $resultupdate === TRUE;
}
$username = $db->escape($_POST['username']);
$password = $db->escape($_POST['password']);
if ($username === "amemorytree" && $password === "pass153word") {
    $position = intval($_POST['position']);
    moveToHistory($position);	
} 
?>